.nav-head
  ul.small-block-grid-1.medium-block-grid-3.list
    li
      a.active href='javascript:void(0)' 1. {{ 'basic' | translate }}
    li
      a href='javascript:void(0)' 2. {{ 'team' | translate }}
    li
      a href='javascript:void(0)' 3. {{ 'invest' | translate }}
.row.stage1.team-content
  .small-12.columns
    .owner
      .person.ng-cloak ng-init= 'owner_edited = false'
        .row
          .small-4.medium-3.columns
            img ng-src=' {{ owner.avatar }} ' alt='owner'
            input id='owner-avatar' type='file' ng-file-select='upload_avatar($files)'
            small.error ng-show=' avatar_error '
              | {{ avatar_error }}
          .small-8.medium-9.columns
            div ng-hide=' owner_edited '
              .name
                a ng-href='/users/{{ owner.user_id }}'
                  |{{ owner.name }}
              .job-title
                |{{ owner.title }}
              .description
                |{{ owner.description }}
              .edit
                a ng-click='open_owner_edited()' {{ 'edit' | translate }}
            form ng-show=' owner_edited ' ng-submit="update_owner()"
              h6
                | {{ 'project_team_owner_title' | translate }}
              .row
                .small-12.medium-8.columns
                  label for='owner_name' {{ 'project_team_owner_name_label' | translate }}
                  input id='owner_name' type='text' placeholder="{{ 'project_team_owner_name_placeholder' | translate }}" ng-model = 'owner_edit.name'
              .row
                .small-12.medium-8.columns
                  label for='owner_title' {{ 'project_team_owner_name_label' | translate }}
                  input id='owner_title' type='text' placeholder="{{ 'project_team_owner_title_placeholder' | translate }}" ng-model = 'owner_edit.title'
              .row
                .small-12.medium-8.columns
                  label for='owner_description' {{ 'project_team_owner_description_label' | translate }}
                  textarea id='owner_description' ng-model = 'owner_edit.description' placeholder=''
                    |{{owner_edit.description}}
              .row
                .small-12.medium-8.columns
                  p.alert
                    |{{ owner_edit_error }}
                  .control-actions
                    button.small
                      | {{ 'confirm' | translate }}
                    a.cancel ng-click='cancel_owner_edit()' {{ 'cancel' | translate }}

    .story
      .row
        .small-12.columns
          h3.title
            | {{ 'project_team_our_story' | translate }}
          .edit
            a ng-hide='team_edited' ng-click='open_team_story_edited()' {{ 'edit' | translate }}
      .team-story-wrapper.description ng-hide= 'team_edited'
        |{{ team_story }}
      .team-story-edit ng-show = 'team_edited'
        form ng-submit='update_team_story()'
          textarea placeholder="{{ 'project_team_owner_title_placeholder' | translate }}" ng-model='team_story_edit'
          .control-actions
            button.small
              | {{ 'confirm' | translate }}
            a.cancel ng-click= 'cancel_team_edit()' {{ 'cancel' | translate }}
    hr

    .members
      .row
        .small-12.columns
          h3.title
            | {{ 'project_team_member' | translate }}
          .edit
            a ng-click='members_edited = true' {{ 'add' | translate }}
      ul.small-block-grid-1.medium-block-grid-2
        li ng-repeat=' member in members '
          .person
            .row ng-hide=' member.member_edited == member'
              .small-4.medium-5.large-4.columns
                img ng-src=' {{member.url}} ' alt='member'
              .small-8.medium-7.large-8.columns
                .name
                  a ng-href='/users/{{ member.user_id }}' {{ member.name }}
                .job-title
                  |{{member.title}}
                .description
                  |{{member.description}}
                .edit
                  a ng-click='member.member_edited = member ' {{ 'edit' | translate }}
            .row ng-show='member.member_edited == member'
              .small-12.columns
                form ng-submit=' update_member(member) '
                  h6
                    | {{ 'project_team_member_edit_title' | translate }}
                  input type='text' ng-model='member.title' placeholder="{{ 'project_team_member_edit_title_placeholder' | translate }}"
                  textarea ng-model='member.description' placeholder="{{ 'project_team_member_edit_title_description' | translate }}"
                  p.alert
                    |{{ member_error }}
                  .control-actions
                    ul.button-group
                      li
                        button.small
                          | {{ 'confirm' | translate }}
                      li
                        button.small ng-click='remove_member($event, member)' {{ 'remove' | translate }}
                      li
                        a.button.small ng-click='member.member_edited = false' {{ 'cancel' | translate }}
      .row ng-show= 'members_edited'
        .small-12.columns
          form
            .row
              .small-12.medium-6.columns.team_ul
                script type='text/ng-template' id='autocompleteMember.html'
                  a ng-class='{disabled: match.model.joined }'
                    .row
                      .small-3.medium-3.large-2.columns
                        img ng-src= ' {{ match.model.avatar }} '
                      .small-9.medium-9.large-10.columns
                        h6.title
                          |{{ match.model.name }}
                          .joined ng-show= 'match.model.joined' {{ 'project_team_member_joined' | translate }}
                          .unconfirmed ng-hide='match.model.confirmed' {{ 'project_team_member_unconfirmed' | translate }}
                label for='invite_user' {{ 'project_team_member_invite_label' | translate }}
                input id='invite_user' type='text' placeholder="{{ 'project_team_member_invite_placeholder' | translate }}" ng-model='invite_user' typeahead='member.name for member in autocomplete_member($viewValue)' typeahead-template-url='autocompleteMember.html' typeahead-on-select='add_member($item)'
                .control-actions ng-hide='autocomplete_invite'
                  button.small ng-click= 'members_edited = false' {{ 'confirm' | translate }}
                  a.cancel ng-click='members_edited = false' {{ 'cancel' | translate }}
          form ng-show='autocomplete_invite' ng-submit='autocomplete_invite_user()'
            .row
              .small-12.medium-6.columns
                p.invite-tips
                  | {{ 'project_team_member_invite_tip' | translate }}
                label for='invite_name' {{ 'project_team_member_invite_name' | translate }}
                input type='text' id='invite_name' ng-model='autocomplete_invite_name'
                .control-actions
                  button.small
                    | {{ 'project_team_member_invite_button' | translate }}
                  a.cancel ng-click='autocomplete_invite = false' {{ 'cancel' | translate }}

      .control-actions ng-hide= 'members_edited'
        button.small ng-click= 'members_edited = true' {{ 'project_team_member_add_button' | translate }}
  hr
  .control-actions
    a.button ng-click='next()' {{ 'next' | translate }}
    a.back ng-click='prev()' {{ 'back' | translate }}
